import { useMemo } from 'react';
import Collection from './Collection/Collection';
import WillPay from './WillPay/WillPay';
import Payed from './Payed/Payed';

const CompObj = {
    willPay: <WillPay></WillPay>,
    payed: <Payed></Payed>,
    collection: <Collection></Collection>,
};
export const useOptionsRender = ({ classCard, footRight }: { classCard: string; footRight: React.ReactElement }) => {
    const CompOptions = useMemo(() => {
        if (footRight) return footRight;
        return CompObj[classCard];
    }, [classCard, footRight]);
    return {
        CompOptions,
    };
};
